package shop.xmall.framework.core.tree;

import java.io.Serializable;
import java.util.List;

/**
 title	标题	string	-
 key	整个树范围内的所有节点的 key 值不能重复且不为空！	string	-
 icon	节点前的图标，与 nzShowIcon 组合使用	string	-
 children	子节点	NzTreeNodeOptions[]	-
 isLeaf	设置为叶子节点(叶子节点不可被拖拽模式放置)	boolean	false
 checked	设置节点 Checkbox 是否选中	boolean	false
 selected	设置节点本身是否选中	boolean	false
 expanded	设置节点是否展开(叶子节点无效)	boolean	false
 selectable	设置节点是否可被选中	boolean	true
 disabled	设置是否禁用节点(不可进行任何操作)	boolean	false
 disableCheckbox	设置节点禁用 Checkbox	boolean	false
 */
public class NgTree<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long key;
    private String title;
    private String icon;
    private int level;
    private boolean expanded;
    private List<NgTree> children;
    private T item;
    private boolean isLeaf;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getKey() {
        return key;
    }

    public void setKey(Long key) {
        this.key = key;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public boolean isExpanded() {
        return expanded;
    }

    public void setExpanded(boolean expanded) {
        this.expanded = expanded;
    }

    public List<NgTree> getChildren() {
        return children;
    }

    public void setChildren(List<NgTree> children) {
        this.children = children;
    }

    public T getItem() {
        return item;
    }

    public void setItem(T item) {
        this.item = item;
    }

    public boolean getIsLeaf() {
        return isLeaf;
    }

    public void setIsLeaf(boolean leaf) {
        isLeaf = leaf;
    }
}
